package com.qf.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.pojo.UserPojo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface UserMapper extends BaseMapper<UserPojo> {
    @Select("select * from user where user_id = #{userId}")
    @Results({
            @Result(column = "user_id", property = "userId", id = true),
            @Result(column = "user_name", property = "userName"),
            @Result(column = "user_pass", property = "userPass"),
            @Result(column = "user_age", property = "userAge"),
            @Result(column = "user_sex", property = "userSex"),
            @Result(column = "user_tel", property = "userTel"),
            @Result(column = "user_card", property = "userCard"),
            @Result(column = "user_years", property = "userYears"),
            @Result(column = "user_job", property = "userJob")
    })
    public UserPojo findOne(Integer userId);
}
